<template>
  <div class="login-panel">
    <div class="button">
      <el-button @click="handleLoginClick">登录测试</el-button>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { useStore } from 'vuex'
import { Account } from '../types'
export default defineComponent({
  setup() {
    const store = useStore()

    const account: Account = {
      username: 'huawei',
      password: '123456'
    }

    const handleLoginClick = () => {
      store.dispatch('login/accountLoginAction', account)
    }
    return { handleLoginClick }
  }
})
</script>

<style scoped lang="less">
.login-panel {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
